package nape.geom;
import nape.geom.AABB;
import nape.geom.Axis;
import nape.geom.Vec2;
import nape.geom.VecMath;
import nape.Const;






class Mat23 {
    
    public var a:Float; public var b:Float;
    public var c:Float; public var d:Float
;
     public var tx:Float; public var ty:Float;
    
    public function new(
        ?a:Float=1.0, ?b:Float=0.0,
        ?c:Float=0.0, ?d:Float=1.0,
        ?tx:Float=0.0,?ty:Float=0.0
    ) {
        this.a = a; this.b = b; this.tx = tx;
        this.c = c; this.d = d; this.ty = ty;
    }
    
    public inline function toString() {
        return "{ a: "+a+ " b: "+b+" c: "+c+" d: "+d+" tx: "+tx+" ty: "+ty+" }";
    }
    
    
    public var eqorthogonal(get_eqorthogonal,never):Bool;
    public inline function get_eqorthogonal() {
        
        var x = a*b+c*d;
        if(x*x < Const.EPSILON) {
            
            var y = a*a+c*c-b*b-d*d;
            return y*y < Const.EPSILON;
        }else return false;
    }
}
